<?php
/**
 * ShopEx licence
 *
 * -------
 * -------
 */
 
class operatorlogmanage_task{

	public function post_install($options)
    {
		$rows = app::get('base')->model('apps')->getList('app_id',array('installed'=>1));
		foreach($rows as $r){
			if($r['app_id'] == 'base')  continue;
			$args[] = $r['app_id'];
		}
		
		foreach ((array)$args as $app)
		{
			$this->xml_update($app);
		}
	}
	
	private function xml_update($app)
	{
		if (!$app) return;		
		
		$detector = kernel::single('operatorlogmanage_application_register');
		foreach($detector->detect($app) as $name=>$item){
			$item->install();
		}
		
	}	
}